#ifndef SPLITTER_H
#define SPLITTER_H
#include "window.h"
#include <commctrl.h>
namespace win
{
/*
	MESSAGES:
		WM_NOTIFY
			Used to notify of change in splitter position.
			The code in pnmhdr is the possible new position of the splitter
*/

class Splitter : public ChildWindow
{
	static
 		LRESULT CALLBACK WndProc(HWND hwnd, UINT msg,
						  WPARAM wParam, LPARAM lParam);
	public:
		enum placement {right, bottom};
	private:
		placement _position;
		Window& _anchor;
		bool _dragging;
		void Draw();
	public:
		int Thickness;
		void Create(Window &parent,
  					const int child_index);
		void AdjustLayout();
		Splitter(Window& anchor, const placement achor_position, const int thick=5);
		~Splitter();
};
}
#endif // SPLITTER_H

